<!-- TinyMCE -->
<script type="text/javascript" src="{URL_JS}tiny_mce/jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
	tinyMCE.init({
		// General options
		mode : "textareas",
		theme : "advanced",
		editor_selector : "mceEditor",
		
	plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",

		// Theme options
		theme_advanced_buttons1 : "mybutton,bold,italic,underline,separator,strikethrough,justifyleft,justifycenter,justifyright, 		justifyfull,bullist,numlist,undo,redo,link,unlink,fontselect,fontsizeselect",
	theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,forecolor,backcolor,emotions",
	theme_advanced_buttons3 : "",
	theme_advanced_toolbar_location : "top",
	theme_advanced_toolbar_align : "left",
	theme_advanced_statusbar_location : "bottom",

		// Example content CSS (should be your site CSS)
		content_css : "css/content.css",

		

		// Replace values for the template plugin
		template_replace_values : {
			username : "aaaa",
			staffid : "1111"
		}
	});
</script>
<!-- /TinyMCE -->
<script language="javascript" >
function save_attribute(){
	var frm =document.getElementById("frmAttribute");
	if (document.getElementById("txtname")=='')
	{
	alert('Khong duoc de trong ten thuoc tinh');
	return false;
	}
	frm.submit();
	}
function update_attribute()
{
location.href="?attribute.index&sAction=edit_form";
}
function new_attribute()
{
location.href="?attribute.index&sAction=add_form";
}
</script>

<form name="frmAttribute" action="" method="post" enctype="multipart/form-data">
  <input type="hidden" name="sAction" value="{sAction}" />
  <input type="hidden" name="sActionEdit" value="1" />
  <input type="hidden" name="Update" value="1" />
  <div class="top_list_page"></div>
  <!-- BEGIN:LIST -->
  <div style="margin-bottom:10px;">
    <table width="90%" border="0" cellspacing="0" cellpadding="0" style="text-align:left">
      <tr>
        <td width="70">Name: </td>
        <td><input type="text" name="txtname" id="txtname" value="{at_name}"  /></td>
      </tr>
      <tr>
        <td>Content: </td>
        <td><textarea name="txtcontent" id="txtcontent" class="mceEditor"  style="width:100%; height:350px;">{at_content}</textarea></td>
      </tr>
      <tr>
        <td>Status: </td>
        <td><input type="checkbox" name="chk_status" value="1" {at_status} /></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td><input type="submit" name="Update" value="Update" onclick="javascript:save_attribute();"  />
          <input type="reset" name="Cancel" value="Cancel" onclick="javascript:location.href='?sMod=attribute.index'"  />
        </td>
      </tr>
    </table>
  </div>
  <!-- END:LIST -->
  <table class="adminlist">
    <thead>
      <tr>
        <th scope="col">&nbsp;</th>
        <th scope="col">ID</th>
        <th scope="col">{ATTRIBUTE.at_name}Name</th>
        <th scope="col">{ATTRIBUTE.at_status}Status</th>
        <th scope="col" width="50px">{FORM.edit}</th>
        <th scope="col" width="50px">Del</th>
        <!--<th scope="col">updated</th>-->
      </tr>
    </thead>
    <tbody id="listProduct" >
      <!-- BEGIN:LIST_ATT -->
      <!-- BEGIN:rowAtt -->
      <tr class="{rowAtt.css}">
        <td>&nbsp;</td>
        <td>{rowAtt.at_id}</td>
        <td>{rowAtt.at_name}</td>
        <td>{rowAtt.at_status}</td>
        <td><a href="?sMod=attribute.index&sAction=edit_form&id={rowAtt.at_id}"> <img src="{URL_TEMPLATE_ADMIN}image/icon/edit.gif" title="{FORM.edit}" alt="{FORM.edit}" border="0" /> </a> </td>
        <td><a onclick="return confirmDelete();" href="?sMod=attribute.index&sAction=do_delete&id={rowAtt.at_id}"><img src="{URL_TEMPLATE_ADMIN}image/icon/del.gif" title="{FORM.delete}" alt="{FORM.delete}" border="0" /></a></td>
        <!-- <td>{rowAtt.product_date_added}</td>-->
        <!-- <td><a href="?sMod=attribute.index&sAction=do_update&id={rowAtt.at_id}">Update</a></td>-->
      </tr>
      <!-- END:rowAtt -->
      <!-- END:LIST_ATT -->
    </tbody>
    <tr>
      <td colspan="8">{navigator}</td>
    </tr>
  </table>
</form>
